package com.sphd.restaurantsystem.adapters;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.sphd.restaurantsystem.R;
import com.sphd.restaurantsystem.info.DuihuanInfo;
import com.wzh.frame.utils.TimeUtils;

import java.util.List;

/**
 * Created by Hu on 2016/12/8.
 */

public class DuiHuanAdapter extends BaseQuickAdapter<DuihuanInfo> {

    public DuiHuanAdapter(int layoutResId, List<DuihuanInfo> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder baseViewHolder, DuihuanInfo duihuanInfo) {
        baseViewHolder
                .setText(R.id.jifen_item_textview,duihuanInfo.getDishes_name())
                .setText(R.id.jifen_time_textview, TimeUtils.getTime(Long.parseLong(duihuanInfo.getRegtime()),TimeUtils.DATE_FORMAT_DATE))
                .setText(R.id.jifen_num_textview,duihuanInfo.getMember_integral()+"");
    }
}
